cmake_minimum_required(VERSION 3.10)
project(AddCustomOperator)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 11)

# 添加头文件搜索路径
include_directories(include)

# 添加源文件
file(GLOB_RECURSE SOURCES "src/*.cpp")

# 查找 CANN 相关库
find_library(CANN_LIB cann REQUIRED)

# 添加可执行文件或库
add_library(add_custom SHARED ${SOURCES})

# 链接 CANN 库
target_link_libraries(add_custom ${CANN_LIB})